﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ec_System.Models.Web
{
    public partial class ItemOrderDetailsData
    {
        public Int32 ID { get; set; }
        public Int32 ReturnMark { get; set; }
        public Int32 ProductID { get; set; }
        public Int32 IsEvaluation { get; set; }
        public System.Decimal Count { get; set; }
        public System.Decimal UnitPrice { get; set; }
        public String QRCode { get; set; }
        public String OrderId { get; set; }
        public String OrderDetailId { get; set; }
        public String ItemNumber { get; set; }
        public String Unit { get; set; }
    }
    public partial class ItemOrderDetailsData
    {
        public String ShopProductTitle { get; set; }

        public String SecondTitle { get; set; }

        public String ImageUrl { get; set; }
        public string VendorNumber { get; set; }

        /// <summary>
        /// 总价, 数量*单价
        /// </summary>
        public decimal RowMoney
        {
            get
            {
                return this.UnitPrice * this.Count;
            }
        }

        /// <summary>
        /// 退换状态
        /// </summary>
        public string ShowReturnMark
        {
            get
            {
                switch (ReturnMark)
                {
                    case 0: return "正常";
                    case 1: return "正在处理 ";
                    case 2: return "已退货";
                    case 3: return "拒绝退货";
                    default: return "";
                }
            }
        }

        /// <summary>
        /// 是否显示申请退货
        /// </summary>
        public string BtnReApplyStyle
        {
            get
            {
                switch (this.ReturnMark)
                {
                    case 0: return "visible";
                    default:
                        return "hidden";
                }
            }
        }

    }
}
